#coding: utf-8
from sys import argv

s=""

class CWords:
  d={}

  def feed(self,s='casa',inicio='c'):
    for palavra in s.split():
      if palavra.lower().startswith(inicio.lower()):
        if palavra.lower() in self.d:
          self.d[palavra.lower()] = self.d[palavra.lower()] + 1
        else:
          self.d[palavra.lower()] = 1
          
  def results(self):
    print self.d



if len(argv)==1:
  s='Ricardo Brito do Nascimento Ricardo Ricardo Ricardo Rodrigo Root Root'
  s1='R'
else:
  s=argv[1]
  s1=argv[2]


if __name__=="__main__":
  c = CWords()
  c.feed(s,s1)
  c.results()
  
